 
const TOKEN_KEY = 'GTMC-ADMIN-TOKEN'
const RESOURCE_KEY = 'GTMC-ADMIN-RESOURCE'
const USER_KEY = 'GTMC-ADMIN-USER'

export function getToken() {
  // return Cookies.get(TOKEN_KEY)
  return sessionStorage[TOKEN_KEY]
}

export function setToken(token) {
  // return Cookies.set(TOKEN_KEY, token)
  sessionStorage[TOKEN_KEY] = token
}
export function removeToken() {
  // return Cookies.remove(TOKEN_KEY)
  sessionStorage[TOKEN_KEY] = ""
}


export function setAuthResources(resources) {
  sessionStorage[RESOURCE_KEY] = JSON.stringify(resources);
}


export function getAuthResources() {
  let resources = sessionStorage[RESOURCE_KEY];
  return resources ? JSON.parse(resources) : null;
}


export function removeAuthResources() {
  return sessionStorage[RESOURCE_KEY] = "";
}

export function getLoginUser() { 
  let name = sessionStorage[USER_KEY];
  return name?name:" ";
}


export function setLoginUser(name) {
  return sessionStorage[USER_KEY] = name;
}

 